#ifndef DYNAMIC_STRING_QUEUE_H
#define DYNAMIC_STRING_QUEUE_H

#include <stdbool.h>

typedef struct QueueNode {
    char *data;
    struct QueueNode *next;
} QueueNode;

typedef struct {
    QueueNode *front;
    QueueNode *rear;
    int size;
    int capacity;
} DynamicStringQueue;

// 创建队列
DynamicStringQueue* createQueue(int capacity);

// 检查队列是否为空
bool isEmpty(DynamicStringQueue *q);

// 检查队列是否已满
bool isFull(DynamicStringQueue *q);

// 入队操作
bool enqueue(DynamicStringQueue *q, const char *str);

// 出队操作
bool dequeue(DynamicStringQueue *q, char **str);

// 查看队首元素
bool peek(DynamicStringQueue *q, char **str);

// 清空队列
void clearQueue(DynamicStringQueue *q);

// 销毁队列
void destroyQueue(DynamicStringQueue *q);

// 打印队列内容
void printQueue(DynamicStringQueue *q);

#endif // DYNAMIC_STRING_QUEUE_H
